package priv.wjh.study.pay.paypal;

import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.service.annotation.HttpExchange;
import org.springframework.web.service.annotation.PostExchange;

import java.util.Map;

@HttpExchange
public interface PaypalClient {

    @PostExchange(value = "/v1/oauth2/token", contentType = "application/x-www-form-urlencoded")
    Map<String, Object> getToken(@RequestHeader("Authorization") String authorization, @RequestBody MultiValueMap<String, Object> parts);

}
